import config from "@/config"
import http from "@/utils/request"

export default {
	//商品信息
	list:{
		list: {
			url: `${config.API_URL}/adminapi/shop.ShopGoods/lists`,
			name: "获取商品列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/shop.ShopGoods/add`,
			name: "添加商品",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ShopGoods/edit`,
			name: "修改商品",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ShopGoods/delete`,
			name: "删除商品",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/shop.ShopGoods/detail`,
			name: "商品详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/shop.ShopGoods/all`,
			name: "商品全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        export: {
            url: `${config.API_URL}/adminapi/shop.ShopGoods/importGoods`,
			name: "商品导入",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
        },
	},
	//商品分类
	cate:{
        list: {
			url: `${config.API_URL}/adminapi/shop.ShopGoodsCate/all`,
			name: "获取所有商品分类",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ShopGoodsCate/edit`,
			name: "修改商品分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.ShopGoodsCate/add`,
			name: "添加商品分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ShopGoodsCate/delete`,
			name: "删除商品分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        export: {
            url: `${config.API_URL}/adminapi/shop.ShopGoodsCate/import`,
			name: "商品分类导入",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
        },
	},
    //宴会厅
	banquet:{
		list: {
			url: `${config.API_URL}/adminapi/shop.ShopBanquet/lists`,
			name: "获取宴会厅列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/shop.ShopBanquet/add`,
			name: "添加宴会厅",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ShopBanquet/edit`,
			name: "修改宴会厅",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ShopBanquet/delete`,
			name: "删除宴会厅",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        export: {
            url: `${config.API_URL}/adminapi/shop.ShopBanquet/import`,
			name: "宴会厅导入",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
        },
	},
    //推介人
	referrer:{
		list: {
			url: `${config.API_URL}/adminapi/shop.ShopRecommend/lists`,
			name: "获取推介人列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/shop.ShopRecommend/add`,
			name: "添加推介人",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ShopRecommend/edit`,
			name: "修改推介人",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ShopRecommend/delete`,
			name: "删除推介人",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        export: {
            url: `${config.API_URL}/adminapi/shop.ShopRecommend/import`,
			name: "推介人导入",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
        },
	},
}
